Below is the only way I've successfully managed to do this in Lazarus and Delphi. You basically have to go back to the FindComponent method and rely on it giving you an accurate answer. This isn't copy/paste code its from the top of my head so minor tweaks may be necessary (I don't have a compiler handy on this system).

[pascal]function getValidName(baseName : AnsiString): AnsiString;
var
i : integer;
begin
i := 1;
while assigned(FindComponent(baseName+inttostr(i))) do
inc(i);
result := baseName+inttostr(i);
end;

function getValidNameFromClass(aClass : TPersistentClass) : AnsiString;
begin
result := getValidName(aClass.ClassName);
end;[/pascal]