From Robert Osfield, tweak to the fix to add comment describing the extra check, and addition of check against width, and change to ==0 rather than <= 0.
From Robert Osfield, tweak to the fix to add comment describing the extra check, and addition of check against width, and change to ==0 rather than <= 0.