gpulib: maybe better loop detection