I don't think there's any suggestion that VW used these techniques, but there are other indicators that could be used. Things like "If the car door or bonnet is open while the engine is running, switch to low-emissions mode", or using the GPS information (a GPS-measured velocity of 0 with an engine running in gear suggests that the car's on rollers).
I've heard stories of cars using these techniques to cheat in tests, but I couldn't find any reliable citations.