/Engine/Source/Runtime/Engine/Classes/Materials/MaterialExpression.h
This overload accepts the set of visited expressions to avoid visiting them again when checking at once whether multiple expressions contain a loop.
bool ContainsInputLoop ( [TSet](API\Runtime\Core\Containers\TSet)< [UMaterialExpression](API\Runtime\Engine\Materials\UMaterialExpression) * > & VisitedExpressions, const bool bStopOnFunctionCall )