Add line number info to duplicate object error message.

Refs #5825