A similar thing happened to me once, I was coming up to a traffic jam and went to go onto the pavement up a sloped kerb but there was a bit of a lip and my front wheel didn't go over it properly and slid along it while my momentum carried me forward (it had been raining which could have contributed) I somehow managed to get onto the pavement without going down - I think at one point I was hanging off the bike to one side! Either way I won't do that again.
I wouldn't say that you ALWAYS have to wait, but one should at least slow down to assess the situation before making a move.