Mark tests as expect_broken when borken with -DDEBUG

The related bugs are #8553 and #8525.