Use scalar predicate on higher level as filter at lower levels

Nikita, thank you! Facets helped with performance a lot. Query which was taking 190 seconds now takes 19 with the same result. However, with facets for some reason query with parameters ceased to work from Java:

query me($a: string, $t: int, $f: int, $o: int) {
  me(func: eq(address, $a)) {
   from @facets(gt(ts, $t)) (first: $f, offset: $o) {
     timestamp
     to {
       address
     }
   }
 }
}

This one is not working, returning empty dataset. If I hardcode parameters in query string, it works, however in this case I suspect I spend too much time on parsing? With filter on predicate instead of facet, parameters have been working. Again I’m doing something wrong?