problem reported and fix provided in PR kern/23065 by Gary Duzan, only slightly adjusted to only do the VTOI() when needed