Disable ID generation during duplicate database

Should fix #1978