Fixed a bug in ContEngine::perm_vars() that could erroneously try permute the contraction result when such operations are not possible.