OAK-1192 NPE in Versioning when a Node has a hidden child node

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1542417 13f79535-47bb-0310-9956-ffa450edef68
Adding references test

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1542418 13f79535-47bb-0310-9956-ffa450edef68