Check (and error on) duplicate ids when explicitly setting the idAttribute.

Closes #295