Added offset to getRecord().
Added offset to random tests.

Although unlikely, there could be duplicate keys.