Improved error detection by rejecting service definitions that contain both "network_mode" and "networks" keys, which is not allowed.