Fix for recursion problem with wrong http basic auth credentials. First
I got an "array_replace_recursive(): Argument #2 is not an array" error
and after fixing that it resulted in another error saying "Undefined
variable: result".
Merge pull request #1850 from bitExpert/fix/recursive_get

Fix for recursion problem with wrong http basic auth credentials
Minor cleanups
Unfold aliases in streamable repos since aliases are already loaded by the pool, refs #1346, fixes #1851