Try2 to make cdist honor the manifest order,
this implementation has some more lines of code,
but no collision with the require variable.