Bug 905338 only redirect the panel location if the message is as expected

Not sure if this will fix anything, but I've added a safe guard and another assert so that I can be sure that future fails were actually using this commit.