I guess the coach I'd passed on the cycle lane had flashed his lights to encourage everyone to do their manoeuvers regardless of my presence.
The three instances where I have been closest to being skittled on a bike in Edinburgh have all been caused by this sort of behaviour. TBH, I'm not sure what can be done to avoid it beyond proceeding through any junction with extreme caution (or building some decent cycling infrastructure, CEC... [As an aside, CEC, I've had reason to cycle down the "quality bike corridor" a few times in the past fortnight. It really is awful and deserves not even the slightest bit of promotion as a cycling facility.])