Integrating Mark Crispin's fix to mbx and mix to respect quotas better.

Passed to me by Steven Roseman at Lehigh University, who had these
changes from Mark in February 2012.