You may have another script command in there which is tripping either IWP or your webserver.
Wish I could help... but the hard truth is IWP is not very useful for anything with even hint of complexity to it.
Not only is it tricky to get it to work but there's lots of stuff that happens at the HTTP server which is hard to figure out... especially if you are using IIS (BLEH).
One way which gets me some limited success is to start the context... i.e., Primary layout and TOG as an IWP presentation first and from scatch and not try to go from an FMP layout accessed by FMP clients to an IWP representation.
Sure hope the next version improves IWP. In theory it's an awesome concept. In practice I have found it easier to go with another tool.
If there are no matching records to "go to", GTRR leaves you on the current layout if you've specfied a layout by name in the script step's parameters. Any chance that this is what's the cause of your trouble?