LPS-49902 Refactor dependency handling.