Mine was simpler (but not as simple as Ralph's if you don't mind using the holding tank) as there was a time when it was set up for direct discharge when cruising and I didn't want anything in the holding tank for those periods. You can retain the one three way valve just after the vented loop in the head discharge line. Change the three way at your sea-cock to a Tee. When you pump the head for overboard discharge the diaphragm pump acts as a check valve and material doesn't go past it. Change the three way valve going up to the deck fitting to a Tee. My pump was only about 6 inches from the main line at that point so there wasn't much retention and it would easily dilute when the tank was flushed. When you suck it out, the diaphragm pump still acts as a check valve and doesn't allow passage of material from either an open sea-cock or the bowl depending on where you have the three way valve set. When using the holding tank, close the sea-cock and wire or zip tie it closed in case of an inspection. I believe you can also remove the handle from the three way so an inspector will see that you would have to use a tool to make it operational for direct discharge and won't "inadvertently" discharge within the three mile limit.
This way you have two spare three way valves and a bit simpler system. If you plumb like Ralph suggests, you can eliminate the three way valve for a "Tee" and just keep the sea-cock closed. If you need to discharge out in the ocean, open the secured sea-cock and pump away. Now you have three spare three ways.
As Ralph say's, best practice is to install a second vented loop on the raw water feed. Double check this one, but I thought it went on the line from the pump to the head, not on the feed side.
Edit: I see now that you already have a Y at the sea-cock. I thought it was another 3 way. Everything else still applies.
