rule 242 of the Highway Code says:
242: Do not overtake on the left or move to a lane on your left to overtake. In congested conditions, where adjacent lanes of traffic are moving at similar speeds, traffic in left-hand lanes may sometimes be moving faster than traffic to the right. In these conditions you may keep up with the traffic in your lane even if this means passing traffic in the lane to your right. Do not weave in and out of lanes to overtake.
So it looks like its ok in those circumstances to undertake