Add condition for detect pom self-dependent