Check for weak dependency correctly.