Oops, apparently scoping is not like I expecteD