Minor cleanup and optimization in compiler (second try)

Also adds a flag to disable interpreter fallback so that unit tests catch compiler regressions.