[BUGFIX] Sync router.js, fix issue w recursive QP loop

Fixes #5037
Merge pull request #5083 from machty/fix-qp-refresh-loop

[BUGFIX] Sync router.js, fix issue w recursive QP loop