He didn't go through his legs. He inadvertently tripped him while diving on a loose ball. Unintentional contact during a loose ball is to be ignored by rule. If he dives through someone's legs to go for the ball, that is not unintentional, he knew what he was doing. The trip was an inadvertent result of diving on the ball and, therefore, unintentional. I would not have made that call at ANY point in the game, let alone the point it was made, and let alone it being the player's 5th foul.
And to the people saying it doesn't matter because he travelled, he didn't. Diving on a loose ball and sliding with it is not travelling. It is only travelling if he tries to get up without starting a dribble or rolls over with the ball after completing his slide.