BuildInfoRecorder can upload "stale" POM when using maven-shade plugin

When using maven-shade plugin, the plugin tends to create a dependency-reduced-pom.xml, which basically contains a slightly modified version of the original POM (dependencies removed, or modified to have provided scope).
When using Jenkins in conjuction with artifactory-plugin suddenly the dependency-reduced-pom.xml starts to get ignored, and always the original POM gets deployed to Artifactory.

After _hours_ of debugging I think I've nailed it down to BuildInfoRecorder#addArtifactsToCurrentModule where the deployable artifact would refer to an incorrect POM (rather than using the correct POM from the ProjectArtifactMetadata), changing that seems to resolve the problem for me. I've ran tests with single module and multi module project and the uploaded POMs looked okay as far as I could see.