Overflow should go out vent
If it's escaping inside the boat, there's a leak in the system somewhere. Since it only happens when you overfill the tank, it's prob'ly the seal around an inspection port or a loose fitting. Your post indicates that overfilling your tank isn't necessarily a rare occurance. If so, you get a HARD rap on the knuckles! Tank vents are NOT overflows...nothing but air should ever be allowd to pass through the vent (except when flushing it out with clean water). Check your tank level before leaving the marina, duck into one to pump out before spending the night on a hook if necessary after you've been out a while. If visual inspection is a PITA, install a gauge. Anyone can have an occasional "ooops" overflow, but more often than about once every 5 years means you're not paying enough attention.