Fix bug with .*$ when run in not-DOTALL UTF-8 mode; small performance improvement for .* in DOTALL UTF-8 mode.