I'll make some assumptions, valid or not.
One: You mentioned an improperly installed water saver valve. Am I safe in assuming your freshwater tank was drained, too? Or do you have a city water hookup? This points to the obvious...some sort of "leak" dumping water into your grey tank. You may have tracked it down. Regardless, you have a leak, so find it and fix it.
Two: I'll assume you wouldn't be asking if you had just used a ton of water and filled the tank...wittingly or unwittingly. 40 gallons is a lot, but then again, it's not THAT much. One must be frugal with water when "dry" camping...no hookups.
Three: I'll assume you don't know how to get rid of grey water. In a true boondocking situation (not in an RV park), and in most situations (not when drainage or soil saturations will lead to contaminating waterways) it's quite reasonable to "dump" grey water. The best way is to bring a bucket and haul away 4 gallons or so in the bucket and dump it on a tree about 50 feet from your site. Repeat a couple times. In most places out west, water is pecious, and leaving grey water behind is beneficial. While grey water can smell a bit, it's essentially "contaminated" only with small food particles and soaps. In the case of food particles, you should not be dumping many solids into your grey tank anyway...scrape the dishes clean before washing. In the case of dishwashing and hand soaps, these are beneficial soil amendments, and dish soap, in particular, is used to clean wildlife contaminated in oil spills. It's not harmful to the environment...it's a surfactant. The same goes for shampoos, etc. Grey water is safe to "dump" in the boonies unless you're in a swamp. If you're lakeside, haul it away from the shore about 50 feet or so to make sure it has a chance to percolate into the soil before it enters the ground water around the lake. FYI, a septic system leach field needs to be separated from a potable water well only about 100 feet...and that's sewage.
Final point on this subject: have you ever watched what happens to grey water on tent sites? Enough said.
By the way...if you're in an RV park or, say, a state campground, use your bucket to haul your grey water to the bathrooms or vault toilets.
So, find your source of profligate water leakage and fix it, and then be prepared to empty your grey tank now and again. If you like to use a lot of water, figure out a way to carry more...
like a few of these. I carry 4 to supplement my boondocking.
I hope you found your leak.