Fixed error in the recursive method for getting module dependencies
Return using the perl way
Merge pull request #709 from Zentyal/jjgarcia/fix-dependencies-order

Fixed error in the recursive method for getting module dependencies