Select predecesor build on same branch - fixes bug reported by Tom Lane.