The problem was that module class suffix was not working and the first solution was to make a tpl file override, placed in local/tpls/blocks and change style=”raw” to style=”xhtml” for the module in question. This solution had been working for years, but suddenly the client reported that their site was “looking weird” again.
It turned out the module class suffix had stopped working again.
The solution this time was quite simple. The site had been updated and the T3 system plugin was version 3.0.2. By updating it to 3.0.4 the problem was solved.