Fix https://github.com/julianhyde/optiq/issues/158, "Optiq fails when call Planner.transform() multiple times, each with different ruleset".