Add paranoid explicit dword truncations before htdir comparisons.
Add wire tests around htdir comparison.