[BUGFIX beta] Sync router.js, closes #5167
Merge pull request #5308 from machty/router-sync-private-namespace

Sync router.js, closes #5167