Properly select visible section when first section is deleted

Use the correct index, 1, to select the visible section in the
builder when the first section is deleted.  The index is 1 because
the first section, with index 0, has not yet been removed from the
collection.

Also clean up some of the logic and variable declarations around
this bit of code.

Without this fix, the builder was showing a blank area when the
first section was removed, instead of the new first section (the
old second section).

Addresses #579