Worth a comment:

    /*
     * recursive method that finds child entities referenced in the config map, side-effecting the entities and entitySpecs maps.
     */