Rewrite local var increment optimization