Correct the dependencies' flags handling.

Thanks to Tinne De Laet for notifying.