The issue was a more generic one. This behavior replicates with both Groovy and Velocity when the HTML has clean=false and we want to add text below an iframe. I've made an issue on the platform for this, and as a workaround, I removed the clean=false property.