Unify cross-version semantics between dbuild + sbt

Two fixes for cross-version semantics in dbuild.   The second commit is less important and only to unify the two systems.

I wrote tests for the cross-version method, and will do so for the sbt system if needed.

review by @cunei