Make sure unintialized @attribute warnings points to the correct file

closes #1996