Fix callstack error when processing installed packages with circular deps. Fixes #1349

To reproduce the bug:
1. Install a package the dependencies of which have circular dependencies. This should complete with no errors.
2. Run the same command again: CALLSTACK EXCEEDED error will occur.

Bower falls into recursion while analysing installed packages.