Fix to NPE during instantiation after moving the instantiation of the gateIidMap...