compiler: check context when adding changes