Fix/cache containers dicsovering regression

Merged Tomasz Maczukin requested to merge fix/cache-containers-dicsovering-regression into master

What does this MR do?

Fixes a regression introduced while switching to library.

Why was this MR needed?

Pleas read #2276 (closed) for a reference.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

Fixes #2276 (closed)