ported classpath container fix from v0.9.x to master