LPS-41138 fix regression bug - themedeployer/basedeployer generates invalid liferay-look-and-feel.xml

Hi Brian please review code. This issue affects ee-6.2.x and ee-6.1.x (where initial changes were backported). Thank you.