fix a really nasty basicaa mod/ref calculation bug that was causing miscompilation of