Prevent this.toggleCheckboxes() from firing on refresh.

Further bug fix to silverstripe/silverstripe-framework#2760.

This fixes an issue with JS firing the onclick event twice when the page is first rendered (e.g. after a 'Save')