by-passing foreach if no dependencies are defined