Minor fixes in filtering invisible windows on Windows platform.