Bytecode transformation that adds traversal code