Gear oil stinks to high heaven. The brown sludge, what does it smell like? Running an engine in a test tank, really doesn't warm it enough or fast enough to clean out the midsection and a buildup can occur. With fresh oil in the lower unit, run it at high speed on the water, then drop the gearcase and see if the sludge is still there. A vacuum test, as well as a pressure test should be done on the case anyway.