Hm I have now seen this behaviour also when for example using TbHtml::progressBar() anywhere. In the TbHtml class, it looks like this:
ob_start();
echo self::openTag('div', $htmlOptions); //directly outputs <div ....></div>
echo self::bar($width, $barOptions);
echo '</div>'; // Just like this line was moved up one line
return ob_get_clean();
For an (I know it’s bad) fix I have now modified this class like this: