That’s interesting. It seems that “x [a thing]” is never matched when examining multiple things. So “x [a thing]” and “x [a thing] and” won’t match, but “x”, “[a thing]” and “and” each match separately.
So the workaround would be
if the player's command includes "x" and the player's command includes "[a thing]" and the player's command includes "and", say ...
Of course now the order isn’t preserved (it matches “and thing x” as well) but that’s probably an edge case.