Adding some anal checks & proofreading code in CanvasSplitter. Adjusting one
'while' loop - using 'do ... while' in its place because that is more correct.
Removing TODO comment because the logic is correct, or it seems to be so, after
close examination. The original code was actually fine.