Merge pull request #1028 from smola/clone-regression

repository: fix plain clone error handling regression