Fix type inference issue in permutedims!