Make theory rewriters non-static (#3547)