Rule 3.2.2 states that for an itinerary,
Africa-Middle East-RTW-Middle East-Africa
One of the visits to Middle East must be a transfer without stopover between Africa
and the previous/next continent.
The key is to go thru DOH both times with the proviso that 1 of the stops thru DOH must be a transit. Can't do JNB-DOH-...LHR/MAD-JNB.
The reverse routing of JNB-DOH-EUROPE-RTW-DOH-JNB is OK as well. Seems that BA does not want passengers going thru LHR 2 times when S.Africa is involved.