Fixed index on the MethodComparator constructor for layout attributes. Added related test case.