OK, I'm looking at rule 4(e)3, §3.2.2: 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.
So would this work? JNB-xDOH-BKK-...-LHR-DOH-CDG-DOH-JNB.
Or this? JNB-xDOH-BKK-...-LHR-DOH-LHR-DOH-JNB.