Added more general memory bounds checks

So that we're between a well-defined / correct start and end each time
we try to resolve thunk information.