fixes logic in getStateOrderingIndx: previous logic assumed each module contained only 2nd-order or only 1st-order states. Now it allows combination of both, though the second order states and their derivatives must be stored together (no 1st order states between them).
getStateOrderingIndx
: previous logic assumed each module contained only 2nd-order or only 1st-order states. Now it allows combination of both, though the second order states and their derivatives must be stored together (no 1st order states between them).