The bug was introduced in TMS 12.6, in p_ARC04IndexArchive. Before 12.6 this procedure, which is run when the task is archived, would record the date the task reached the COMPLETE workflow step if the task did not already have a recorded CompletedDate (from CompleteInvoice). After a refactoring in 12.6, this condition was lost.
However, even before 12.6, there was a limbo period where a non-archived task could have been at COMPLETE, without having passed through CompleteInvoice, but would not be considered for PerfectMatch, since the population of the CompleteDate was only handled at the point of archiving.