Switch to IPath based check for nesting