Orders the specified list of modules based on their inter-dependencies.

def order_module_dependencies(modules, parser):
    """Orders the specified list of modules based on their inter-dependencies."""
    result = []        
    for modk in modules:
        if modk not in result:
            result.append(modk)

    #We also need to look up the dependencies of each of these modules
    recursed = list(result)
    for i in range(len(result)):
        module = result[i]
        _process_module_order(parser, module, i, recursed)

    return recursed