'Tries to match the message against our own prefixes, possibly modifying
what we send to included things, then tries all included items.'

def match(self, message):

    message = message.copy()
    call_args = {}
    for (name, prefix) in self.prefixes.items():
        if (name not in message):
            return None
        value = Router.normalise_re_arg(message[name])
        match = prefix.match(value)
        if match:
            call_args.update(match.groupdict())
            message[name] = value[match.end():]
        else:
            return None
    for entry in self.routing:
        match = entry.match(message)
        if (match is not None):
            call_args.update(match[1])
            return (match[0], call_args)
    return None
