Ensure consolidator works when functions are reordered
Merge pull request #1783 from ericmj/consolidation-order

Ensure consolidator works when functions are reordered