Yes, it happens with 5.2.14.
This OQL query can be run on a heap dump to check references
SELECT l.query.toString() FROM INSTANCEOF org.hibernate.engine.query.spi.QueryPlanCache$HQLQueryPlanKey l