ocperf: fix recursion check