fix wrongly instanciated scoped_locks

Change-Id: I7b1871e83d4f93e7a80d0647c3ac688ae218234e
Reviewed-on: http://gerrit.aldebaran.lan/49104
Reviewed-by: jlamotte <jlamotte@aldebaran.com>
Tested-by: vbarbaresi <vbarbaresi@aldebaran-robotics.com>