Save typespecs attributes with proper line numbers, closes #1613