The sensitivity of current searches for gravitational-wave bursts is limited by non-Gaussian, nonstationary noise transients which are common in real detectors. Existing techniques for detecting gravitational-wave bursts assume the output of the detector network to be the sum of a stationary Gaussian noise process and a gravitational-wave signal. These techniques often fail in the presence of noise nonstationarities by incorrectly identifying such transients as possible gravitational-wave bursts. Furthermore, consistency tests currently used to try to eliminate these noise transients are not applicable to general networks of detectors with different orientations and noise spectra. In order to address this problem we introduce a fully coherent consistency test that is robust against noise nonstationarities and allows one to distinguish between gravitational-wave bursts and noise transients in general detector networks. This technique does not require any a priori knowledge of the putative burst waveform.