Added parameter for also getting dynamic dependencies to getDependencies.