Dynamically add routes, refs #1271.