ksm: fix NULL pointer dereference in scan_get_next_rmap_item()