Feature 3779 checkbox sorting

Redundant variable declaration. "h" is an iterator that gets defined as one in line 564. This declaration elevates the iterator's scope outside the function.