Add missing recursion during dependency resolution. See #405.