Yes this happened to me when training (early solo circuits) following an aircraft clearly visible infront downwind, reached the point I normally turned base aircraft in front goes straight on. I've been told I'm number three and can see number one on short finals. When the aircraft infront left the ATZ (clearly defined by a motorway) I convinced myself I was following the wrong aircraft so I turned base at my usual spot and ended up being number two instead of three. ATC told me not to worry about it so they must have thought he was leaving too.