#25582 Resolved recursive trap in frameworks install.
If an APP required frameworks A and B and framework A also required
framework B and none of the frameworks had been installed, an exception
would be raised because of the depth-first manner the recursion was
carried out. Changed to breath-first to that the environment object
is correctly representing the changes that are carried out as part of
the recursion.