Extract instance nodes in forward order.

This is important because otherwise the instance cache will re-insert re-used instances backwards
R=arv
BUG=

Review URL: https://codereview.appspot.com/10114044