[TAV-421] Fix off-by-one error in port value sizes.

Test added to catch regression here too.