Yes and it was widely known at the time that they were specifically being targeted while most manufacturers were using defeat devices because they were outcompeting American auto makers.
They knew that when doing the testing, the car would be on a rolling road inside, and usually when they do that they have the car doors open to let air go into the cabin and to talk to people etc.
So they programmed in a rule that "if the car is doing 100kph, and the door is open, change engine map to use more fuel and output less emissions".
Because it was extremely unlikely someone would have the car door open and doing 100kph in any other circumstances.