Detect functions that try to bind variables from an outer scope.

And raise an error saying that's not supported.
Addresses BIT-1233.
Merge remote-tracking branch 'origin/topic/jsiwek/outer_param_binding'

That works. Just renaming "param" to "ID", as locals are affected as
well.

BIT-1233 #merged

* origin/topic/jsiwek/outer_param_binding:
  Detect functions that try to bind variables from an outer scope.