[TIMOB-13685] Fixed am infinite recursion bug in createGlobalContext