use range asserts when loading bools and enum discriminants

Closes #4924

There are some more `Load` calls that could use this, so it's not completely done yet.