Fixed the last of the issues with the windows tests.
Fixed when to make an assertion and what to compare.
Fixed a couple of lookup issues on X11 platforms.  There is still a problem when optimizing for size.