[gsubgpos] Fix bug in cached ChainContextFormat2 application
diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh
index 089fa57..db61773 100644
--- a/src/hb-ot-layout-gsubgpos.hh
+++ b/src/hb-ot-layout-gsubgpos.hh
@@ -3538,7 +3538,7 @@
*/
struct ChainContextApplyLookupContext lookup_context = {
- {{cached && &backtrack_class_def == &input_class_def ? match_class_cached : match_class,
+ {{cached && &backtrack_class_def == &lookahead_class_def ? match_class_cached : match_class,
cached && &input_class_def == &lookahead_class_def ? match_class_cached : match_class,
cached ? match_class_cached : match_class}},
{&backtrack_class_def,