Merge pull request #6157 from s0undt3ch/hotfix/pip-logic-improvements

Pip logic improvements and **way** lot more tests!
Minor Typo.
Handle nested dictionaries when converting from an `OrderedDict` into a `dict`.