This was a huge mistake by the NBA referees.