The law DOES make a distinction based on who did the marking. Your quote clearly states that it refers to people playing the game, which would exclude the casino.
The cards also weren't marked. The backs were identical. The dealer selectively rotating some cards is what made some identifiable.
The law also says that the player must "substitute and use" marked cards. The casino made the substitution. The cards were marked or tampered with.
Moreover, if this interpretation is correct, and the game is simply invalidated, then it is far more exploitable. In the case of any kind of marked card a player could simply bet huge (randomly) and if they lose invoke this law, invalidating the game.