Fixed in 5.1 branch as well.
In 5.1, the default value for hibernate.query.conventional_java_constants is false. In later branches, the default is true.