Use the bundle registry in sugar-install-bundle (when sugar is running)

Fixes #4722, while remaining compatiable with non-sugar users of the installer