Doozer backends: Move the lookup code to a function of its own. If there
are multiple backends, try them in a row before giving up.