Fix added-or-removed detection by making it context-sensitive.