I haven't flown the Viggen for quite some time, but I seem to recall that if you drop the BK-90 outside of the drop range (indicated by the horizontal line on the bottom of the HUD) the BK-90 will release but, as you describe, glide over the target without dispensing.
Make sure you are within drop range and please tell me if it works. :)