Fix a bug in setting the flag of using dependencies' Berksfiles