Fix validates_associated when documents are flagged_for_destroy

Fixes issue #3618.