checking for selfloop within merge_lambdas