Improve and simplify blocksize calculation in transpose

This also yields better scaling.