Fixes #3607 : Latest commit restoration now works again with the API
Merge pull request #217 from VinceMacBuche/bug_3607/fix_last_commit_api

Fixes #3607 : Latest commit restoration now works again with the API