Fixed custom validation context bug where child

associations were not being saved.

Fixes #13854.

Credit to @asn62 (Aaron Nelson) for working together with me on this and
also credit to @Fortisque for the test cases.