Don't rely on the XML being broken (if they fix it, our code wouldn't work anymore). Instead, use the transform function we already have :) This partially reverts commit c7bee2a725.
c7bee2a725