Fixed problems with dependsOn project loading.
(cherry picked from commit e3971e9)