Treat the non-general situation as a special case for efficiency. This is now less than a factor of two slower than the MATLAB version.