Fix bug with too aggressive Unicode escape sequences

Fix bug with too aggressive Unicode escape sequences

Fixes #1308