Fix bounds checking so that we don’t get analysis killed by exceptions when it’s wrong.
Fix a potential memory management error if the main thread doesn’t retain the invocation correctly (seems to only affect GNUstep).
Prevent early exit of the run loop on GNUstep.