Fix NULL dereference on rehash when there is a fatal error in the configuration of connect classes

Fixes issue #780 reported by @JDowny