After fiddling with it a bit I've minimized it down to:
```
object Test {
  q"do ${ val x = 1; x } while(true)"
}
```
Here x's owner is outer Test scope. Now you expand the quasiquote and get:
```
object Test {
  build.withFreshTermName("doWhile")(n => 
    LabelDef(n, List(), 
      Block(
        List({ val x = 1; x }), 
        If(Literal(Constant(true)), Apply(Ident(n), List()), Literal(Constant(())))))
}
```
Here the proper owner is anonymous function, not the Test. Hence symbol corruption.