Given the apparently illogical flight-plan, does it seem more likely that the plane was either picking up some extra cargo or offloading something before flying to Dubai? They may well also have taken on fuel for the flight to Dubai, but the geography suggests that there must have been a reason to fly in the opposite direction to their destination.
I'm wondering if there was something changed in the cargo configuration at Bagram, whether it's been admitted to or not.