Use LinkedHashMap so that the topological sort will process the nodes in the same order.

We already collect the methods in the correct order (methods of one class are consecutive.) The topological sort should output the same order in the simple case that there's no dependent methods.