I think I might have misunderstood the way the framework works here. What I was seeing was that if an interaction changed the URL e.g. through a GET request then the new URL was never reflected in this code, which meant that it was stuck in a loop re-loading the same interaction. But, I probably misunderstood this.