Merge "Properly handle PACKAGE_REPLACED in addition to _ADDED and _REMOVED"