Another thought: if the traffic is really jammed up, you could likely just lane split all the way up to the light. And if the jam continues on the other side of the light such that cars on your side still won't move much, then you could still head on though the light and continue splitting.
This instead of using the sidewalk, if splitting is legal.