Does 'undertaking' mean overtaking on the LHS?
And (I'm ashamed to say here now I've been reading this) it has never occurred to me to move outside a cycle lane and plant myself in the middle of the car lane when I stop at the lights. So what's the drill with this?
Do you always move into the car lane as you approach traffic lights? What if there are a whole lot of cars stopped (no lorries) and the cycle lane is clear? Do you go right up the front, and then move past the stop line and put yourself in the middle in front of the cars? Or do you give up the advantage of the cycle lane and hang back in the middle of the car lane as soon as you can see stopped traffic ahead?
What are the safety rules here?
IMO the fact that you have to question when you are better off
ignoring the infrastructure and that it's complicated enough to not have simple answer is a very clear sign that the infrastructure is failing horribly. For some reason I doubt such substandard infrastructure for cars would last that long.
Anyway, it depends, but as a rule of thumb I move up on cars only when I'm certain that car has no chance of starting to move before I've passed it completely. In case they're indicating I'm more likely to try to move to the opposite side, or take my place in the queue behind the car. In case the car does start moving I'll fall back behind it.
If there's a clear cycle lane and the road is wide enough after the junction then I'd probably stay in the cycle lane (or more likely on the right edge of the lane given the generous lack of space) but if there's parked car or bus or other obstruction, I'd get in the middle of the lane. Basically I figure out where I want to be after the junction and position myself accordingly before it so that I'll be going in a straight predictable line. (Though I do try to be mindful of faster traffic so if I feel I can safely let a number of cars get through the junction before I have to get back into the lane, I let them.)