Allow us to detect duplicate inserts. Fix GetColumnsForItems.
Fix tests.