Fix off-by-one error in the IO manager

The last enabled event manager was being needlessly restarted after
increasing the number of capabilities at runtime.