Add more tests for goto statements
Fix problem with detection of root scope for prototype

Ignore the label's scope when looking for the root scope.
Avoid creating a label's scope when not needed

This change is required to ensure that a forward goto is accepted as
valid if and only if now new local variables are defined.