Don't bother with deletion for non-persisted records.
Partial cherry-pick of d393fe1a1f15f08c77e51858ff5e7a3d6c957858