Resource compartmentation and the stability of real ecosystems