I'll give a try with your proposal, I believe it might fix the routing however if I got it right, tunnels will not be visible as per my 1st email attempt.
On the other side, related to your comment "with your latest rules, secondary highway with tunnel finishes processing of this object", I believe this was my intention: up to res 21 I'd like the line to appear as 0x04, from resolution 22 it should appear as 0x11 if a tunnel, otherwise 0x04 - no further processing is needed. Could you pls let me know why the reasoning is not correct?
Thanks!