Move invocation of 'setup_generic_relations' to an AppConfig instance to guard against premature model access.