The same logic as in GZDoom applies: The root must not have any other content and the subdirectory must contain identifiable game content.
Some handling was also added to strip out macOS resource fork folders because they can contain data that can confuse file detection.
It now picks the minimum of the current formula and the one from before June 2017 - the current one was causing problems with sprites in the distance so now the old one is used as an upper bound.