Modules: make sure we store modules in an ordered list so that every error is deterministic

Otherwise we end up walking modules in random order and produce different errors based on the
time of day
ModuleValidator: produce a consistent error message with versions ordered