Revert "LPS-48313 partial revert of the logic that breaks deployment of the OSGI modules that require web.xml"

This reverts commit 01c52d3e3cb429ac26920e37d6b5b068ca4f0de0.