Consistency Conditions for Kaluza-Klein Anomalies