Look for random pages in both directions

Avoids returning nothing for small datasets.

Change-Id: I63869d56560c5bc656945c27df22d28952a7987b
Merge "Look for random pages in both directions"