LPS-41325 Inconsequent behavior of checkboxes

See: [LPS-41325](https://issues.liferay.com/browse/LPS-41325)
Original pull request: [blzaugg#94](https://github.com/blzaugg/liferay-portal/pull/94)
Previous pull request: [noellekimiko#5](https://github.com/noellekimiko/liferay-portal/pull/5)

See previous pull request for comments