Better detection of globals in typing, for combines

Types actually need to be combined when there's no assignment, for example dictionnaries:

x[1] = 2

Means it's a dictionnary of int, int and x wasn't assigned.

Also fixes a bug in the combiner (I had stupidly modified depth of self.node_to_id before)