Fix duplicate key in unit test. Closes #1302