Fix Repository.resolve() to not throw runtime exceptions