Fix bug with too aggressive Unicode escape sequences

Fix bug with too aggressive Unicode escape sequences

Fixes #1308
Or maybe it does get cleaner, I'll try.