OAK-654: MapBranch size preconditions can fail

Add a test case and fix the problem.

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