BZ-1074015: additional commit in order to not consider object self-references when evaluating if they can be deleted.