Fix hung syncs from too-long notes with invalid characters