PS-34824 Enable Staging fails when there are folders in repositories that aren't in the default repository

Hi Mate, could you take a look of this LPS and complete the fix?  @juliocamarero told me that you are more familiar with the code. 
Thx