Note that I removed this chunk of code from `register_resource_spec` and `register_page_spec` because this stuff is already tested by `menu_spec` and `menu_item_spec`.