- fixed infinite loop in setupHandlers() after loading a new config handlers file
- adds a test for #941
- fixes #941