handle loose % more efficiently

only correct a loose % if an escaped % isn't already present