Various tags are "special" when it comes to what children they allow (when their children are structured). Any special cases (such as for "if" and "foreach") need to be handled carefully. Set is similar and something that would require added support. This would apply to other tags too, though I suspect there may be some elements here which can make this a bit awkward.
Regardless, I don't think this is something we'd consider a bug -- if so, it'd roughly be as designed -- so I'll move this to suggestions. I'd note that in most cases you can workaround this in a pretty straightforward way (such as moving the set within the cell, if it's related to the HTML), though there may be a few edge case difficulties.