I do wonder if there was an option to off-load the unfortunate ill passenger at Baku to receive the medical care needed, perhaps top up some fuel if needed, and then proceed to Dubai via Turkiye and Iraq within the flight crew's legal operating hours?. 400 pax arriving at Dubai might be easier...