Fix a problem with popping a non-existent path from the hierarchy