Instead use the metarializer Func that can be part of the compiled model. This would require refactoring to make the materializer compatible with any combination of Includes