if the drain hose is connected under a sink on the waste this will be the issue.Drain hose must go upwards from the spigot on the sink before going down to the dishwasher otherwise dirty water from the sink will run straight down in to the dishwasher sump as you say.Re route the drain hose upwards as high up under the sink before turning it downwards to the dishwasher
CK
December 2013