Joker valve is part #23 on the drawing
It's a one-way valve that prevents a backflow from flooding the bowl. It has a slit in the bottom...over time waste going through it stretches the slit till it becomes a hole that no longer closes. "The head was working fine..." Marine toilets, unlike household toilets, have moving rubber parts that wear out...they wear out even faster if they're not kept well lubricated--which I'd bet real money you didn't do while you had it apart...but you can when you put the flapper valve back in or rebuild it (lubricating instructions at the end of this).The rubber parts in a toilet typically last about 5 years...a joker valve 2 years at most. If you replace 'em as preventive maintenance when the toilet is clean and dry, you'll reduce the odds of ever having to repair it when the bowl is full and won't go down by 99%. About your leak...a hose that doesn't come straight off a fitting--one that's forced to go at an angle--is just about guaranteed to leak. It usually is caused by using a straight discharge fitting on the toilet where a 90 is called for or vice versa...by just using whatever came with the toilet, whatever it takes to make it work, instead of getting the other one from the mfr...and boat builders are just as guilty of doing that as owners. From your description, it sounds like that's what you're dealing with. Using just one hose clamp can also allow it to leak. ALL sanitation system hoses--and all below-waterline connections too--should be double clamped, with the screws on opposite sides of the hose. Overheating a hose to make it bend tighter than it wants to bend willingly also creates problems...anything from leaks to a collapsed hose.To lubricate the toilet...buy a tube of thick synthetic (not petroleum based--petroleum is destructive to rubber) teflon grease...put a HEALTHY squirt of it in the pump...pump a few times after you put it back on the base to spread it all over the inside of the cylinder...your toilet should pump smoothly all season without any need for any further lubrication. This should be done annually, but unless you have another reason to remove the pump from the base, you should be able to do it by just removing the top of the pump. For more way to prevent problems, check out the link below.