Do they have comms kit in this match?
If so the communication should have been vocalised before play was ever stopped to allow the assistant to help the ref with the decision as the ref must have known he didn't have the best viewing angle. I feel that if the ref had delayed the whistle to confirm what he thought he saw with the assistant then the whole situation could have been saved there and then, instead of having to go back and change everything, which in the end is what made all the headlines.
But otherwise, top marks for the assistant getting involved there. Takes a lot of courage to rule out the referee.