bugfix: half of records were randomly returned, with no sorting

because of nullmap handling, half of records were dealt as NULL
in kernel space. It leads incorrect behavior on comparison
function; that always 0 if both of inputs were NULL.