Fix for issue #504

This just duplicates the logic found in initializers/routes.js to prevent custom routes from being blown away during an action reload.