This relands commit b380a31d. Restrict the tests to Windows only since the flag symbol hash depends on system-dependent path normalization.