It seems JanusGraph misses the chance to optimize a query like `g.V(4144).as('x').V(4336).outE('knows').where(__.inV().is('x'))`. If you split it to two queries, where `v2 = g.V(4144).next()`, and then `g.V(4336).outE("knows").where(__.inV().is(v2))` shall work as expected.
Feel free to create a feature request on JanusGraph GitHub :-)