Fix testcase and implement recent fix with new _is_parent_path function.