LPS-31496

Please run a proper test to make sure I covered all the cases.

One thing I am not sure about is, GIT a76e43ba68d82b1ebe90a62ff3e8647694eb1d4a Bruno Basto's commit "Fixing duplicate content being included".

I have no idea whether this is needed, can you help me to confirm this? If it turns out to be required, please cherry pick that commit back.

Thanks