AGP-269: check contexts before match