My understanding is that the airline is required to follow the rules that pertain only to the ticket they are party to. As that ticket ended in JNB, they would only be looking at entry requirements to JNB. The TWOV part would only be applicable if there was onward travel on the same ticket. Very unfortunate for sure.