Bounds inference fixes for possible overflow of small types.