Fix dependencies inclusion

@jensens, could you please test again and revert 35ce06988d22e4803e70caf5528ab285ef863f35 in case the issue is fixed?