Validate config objects before trying to activate them.

Fixes #3619