Support for merging scopes

I just updated to version 2.0.1 and merging scopes is not working.
I'm not sure if the solution is correct, but all other tests pass...