Handling dependency management in the AOM is a big can of worms I'd rather avoid for now. It's not quite the same, but Dave's blog post from 2010 has some background reading:
http://www.oxymoronical.com/blog/2010/01/Do-we-need-extension-dependencies