Remove entry from cache before inserting new entry
"If value already exists in the set, the set is left unchanged" https://doc.qt.io/qt-5/qset.html#insert
The entry with the updated data was consequently not written in the cache => the old state without the installed files got saved. In case of the RemoveDeadEntries option the entry wouldn't be marked as installed when reopening the KCM.
Any chance this can go into 5.76? (Of course it needs a proper review first)
Edited by Alexander Lohnau