Bug 20672: Fix jaldb_next_unsynced_record