Fixed DOM Selectors not correctly being parsed in th:include and th:replace when finishing with text()