fix($compile): always instantiate controllers in parent->child order

Previously it was possible to get into a situation where child controller
was being instantiated before parent which resulted in an error.