Fix frame switching after frame redirect/creation (follow on)

Continuation of #1177.

@mrmr1993:  I did some tidy up of #1177.  Could you double check, please, and also check the comment (which I will make in a few moments) below?
`BackGroundCommands` is undefined. You need to change this to `BackgroundCommands`.

Is there some reason that just `nextFrame` wasn't okay?