[TASK] do not insert empty 'insert records' elements of referenced but deleted source elements

If content elements were referenced on other pages and afterwards deleted, the pages with references were not updated and therefore the element is still referenced from there. This commit avoids empty 'insert records' to deleted elements.