SP-112 Template distortion
Added test for attribute table ordering