Added createChains to link two-link chains with duplicates.