Fix doIf and doWhile in Scenario

Due to a misplaced function argument, using either of these constructs
in a scene would crash the engine.