Make CreateWidthMap less vulnerable for stack overflows