If the template's Permute value is zero, it will match a target only if it can do so without changing the order of its axes. Otherwise, it will attempt to permute the target's axes as necessary.
The default value is 1, so that axis permutation will be attempted.
AST A Library for Handling World Coordinate Systems in Astronomy