Merge "Optimisations and bugs in SpellChecker"