JCR-2156: Unexpected behavior while importing data with IMPORT_UUID_COLLISION_REPLACE_EXISTING
JCR-2156: Code cleanup and perf fix