Fix for https://github.com/neo4j/neo4j/issues/1304