Temporary fix for #2344 rollback after delete for recordArrays

This is a temporary fix, it's clear this code needs to be refactored.
Moreover I am not sure that removing deleted records from recordArrays
before they are deleted is a correct design decision.