It looks like INDEX BY does not work from DQL queries. Haven't tested it when using query builder.
Test case
INDEX BY got optimized away, the SqlWalker currently does not interpret the INDEX BY clause.
Fixed
Test case