Coupled modes locally interacting with qubits: Critical assessment of the rotating-wave approximation