LPS-44874

Hi Migue,

this one solves several issues related to sharding + upgrading. We already sent a patch to a customer through SDH process, covering a subset of the cases detected in master.

CC'ing @achaparro as he is awaiting for this to be in master to test more LPSs

Thanks for your time