fix flakiness from installing the same card being trashed
add support for self-replicating link