bugfix in type inference (generation of fresh vars/scopes: use negative ints)