Change to ensure function parameters are introduced into the correct containing scope when initially checked, eliminates clashes with top-level declarations