Fix minor bug in API allowed_methods.

Make sure tuples are iterated properly if they have only one item in them.