NEXUS-6219: Backport to 2.7.x

Original PR
https://github.com/sonatype/nexus-oss/pull/319

Issue
https://issues.sonatype.org/browse/NEXUS-6219
Merge remote-tracking branch 'origin/nexus-2.7.x' into nexus-2.7.x-NEXUS-6219
Merge pull request #333 from sonatype/nexus-2.7.x-NEXUS-6219

[2.7.x] NEXUS-6219: Backport to 2.7.x