By the way, I know this is an old thread, but I was looking for something related to whereis and came across this. I think the problem was that the first set command is missing the "country":
set country [class match -value [whereis [IP::client_addr]] equals CTS_COUNTRY]
Change that to:
set country [class match -value [whereis [IP::client_addr] country] equals CTS_COUNTRY]
And it may work as anticipated. The log command uses the "country" which is why that works, but the $country variable simply wasn't being set properly. Had the log command used the variable $country instead of doing another lookup, then the original poster would have seen the default "whereis" returning a TCL list of {continent country region city} since no modifier was used.
Since nobody else mentioned that specifically, I thought I'd reply to a stale thread.