applying fix from 1.1 and reworking patch

resultset.find() will return empty array if invoked via
collection.find() but it will return this if chained; applying the fix
from calculateRange from 1.1 branch in case tests depend on it