Wrong configuration when using infertype, try to resolve using the instantiated type