This was the same sort of thing that drove me crazy trying to support fcrepo 4.x too. Short of changing everything, can we at least push this (and line 205?) down into some helper on Datastream?