Fixes OAK-9781 by setting the limit to 0 instead of 1.
To avoid re-doing the work on adding tests, this builds on https://github.com/apache/jackrabbit-oak/pull/566