Fix a bug in get_path_for_alias