Fix underflowing packed addresses

They need to be converted to 32-bit values first, then multiplied, or
else they can overflow and be too small.
More miscellaneous fixes.