pick the first of a duplicated file with differing tags
fix slow implementation of "clean"