[server] DBAgent: Detect inconsistency of number of an array and enum for it.