Rework configuration validation to fix #461