moved ret loc check to keep antlr from misbehaving