Fix control flow bug in tooling interpreter

Fixes #2116