Fix scope corruption on Semantics.