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

This reverts commit b8bb0009824310c11dac99aa1886a3c7e0de3be7.