Simplify parent path check