Cached AD Information gets overwritten by AD Connection Error

How can I test for the condition where the AD cache has been overwritten and the cache file for the logged on user has the error message:

Failed to get attribute "distinguishedName" : Windows Error 0x8007054b: The specified domain either does not exist or could not be contacted.

It appears that this relevance may work:

concatenation of (unique values of values of components whose (type of it="CN") of distinguished names (distinguished names of (groups of local users of active directory))) != ""