Bugfix in rewriting except patterns