Fix smartmatch warnings (RT#85618)