path_to_location now returns 404 on orphaned items. Resolves LMS-9661.