Reproducer:
group g {
group sub is t { }
method foo() {}
param b = 4;
}
template t {
method bar() { foo(); }
param p = b;
}
Here, both 'b' and 'foo' fail to bind to their definitions in group g.
In-lining the template into group 'sub' fixes the issue, moving declaration from group 'g' to top-level fixes the issue.