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

http://www.rudder-project.org/redmine/issues/3607