Introduce threadskv4b.c with duplicate key management