properly account for 'escaped globals' in more cases
stable 'escaped globals' dump to make tests reproducible