Fix handling of labels in nested scopes