issue #21836: Hack in a fix for loading of collections with relations.