Sorry about your near accident. Most drivers will have been there, me very much included. Don't beat yourself up! You are ok.
Unfortunately, road markings are not always driver friendly or logical. We have a roundabout now with new lane markings and traffic lights which is horrid. You need to know the road number to get in the right lane, and you can't read road markings if it's very busy. It's not enough to know which road you want or destination. People either go round and round or cut in dangerously sometimes, if they are unfamiliar to it.