bsd.dep.mk: fix race condition with beforedepend