Refactor async dependency map builder into separate function so that it

can more easily be overridden by subclasses.