Fixes #4253

Would it also be wise to throw an exception when an association is redeclared? We do this for cache/log configs.