Golden State Warriors scored a controversial uncontested dunk after confusion over which team had possession of the ball against the Dallas Mavericks.