Fix generation of eager loading for childs on required and conditionable wheres

Fixes #1640