OPENJPA-2502: NPE in QueryKey.createKey using criteria with QueryCache enabled - committed Albert Lee's patch to 2.2.1.x