Fixed possible NPE when no explicit classloader was given to the classloader cache