Closes #421 bug with locals in engine