Fix Issue 2479: hang-up with long escape sequences