ir: Remove scope from Function, add scope to BlockStatement.
semantic: Remove merge cruft.
semantic: Correctly gather and lookup with nested block statements.