fixed bug for concurrent replament pairs

This fixes the bug for teached/taught. We choose the longest key, and ignore the rest (tgheached). I think it is very improbable that we need ever to check all concurrent keys.