LPS-51208 replace enhanced loop with indexed loop to prevent possible concurrency issues during bundles registration.

Please review it, it's kind of urgent ;) Thank you!