WIP: Java8 incompatibility with appcontext impl using containsKey()

Attempt at a fix for https://issues.sonatype.org/browse/NEXUS-5822