Fixes for the validation algorithm with nested objects