3a702ec028
Not re-reading linked data-blocks in undo/redo case also means that we do not touch to their usercounts. Even worse, lib_link process in readfile will increase those (for cases where local data uses linked one). Whole data management code is now heavily relying on valid consistent refcount of all IDs, so we cannot allow that anymore. Simple solution here could have been to then not increase that one for linked IDs in `newlibadr_us()`, but unfortunately that would not be totally bullet-proof, as some local users of linked data may be added or removed by an undo step... So I cannot think of any other solution than the ugly brute force one, i.e. going over the whole Main database and recompute linked IDs users count... Should not be a big issue performance wise though, this is fairly cheap process.