Reviewed-by: simonis, stuefe
Fix object lock recursion count and add test Reviewed-by: sspitsyn, dsamersoff