The double diversion is actually a significant improvement based on operations software originally pioneered by DL.
The medical diversion to YYT was, of course, unavoidable. At that point, it would have been apparent that the crew would time out prior to LHR and the aircraft would likely have returned to its origin to await a relief crew on the next flight.
Flying on to DUB is relatively easy and getting a crew over to DUB is not hard and even if that does not work, moving passengers from DUB back to LHR can be arranged through other means.