Fix edge case of resolutions not working properly when resolving to branches, modifies #819, closes #818.