Prevented clashes in the app registry. Fixed #22790. Thanks timo for the report. Backport of 6e5651e5 from master