Don't loop through dependencies if there are none.

This fixed my problem in issue #212.