The issue on appeal would be whether JSS was required to strike cruelty as an aggravating factor in light of the fact that it was based on admittedly false testimony. JSS acknowledged that the testimony was false, which ordinarily would mean striking the agg factor, but then quite reasonably pointed out that if Flores had instead testified (in 2009) to the exactly opposite thing Horn actually said (in 2013), the result would have been the same. And for extra insurance she threw in the fact that the DT had already known about Horn's testimony for a year and hadn't said a word about it. (Presumably this was due to a pretrial interview of Horn.)
Harmless error is a thing that comes into play only at the appellate level. The appellate court could say: (1) we agree with JSS that the DT was late in raising this argument (but then that would be ineffective assistance of counsel...), (2) we agree with JSS that the murder qualified as cruel with "gunshot last" and that it doesn't matter what Judge Duncan's reasoning was as long as she got it right, or (3) we disagree with JSS--she was required to strike the agg factor--but it was harmless error. Number 3 makes literally no sense, of course; if she was required to strike the sole agg factor but didn't, and a death sentence was imposed, that would be an error that directly affected the sentence.
If JA meant to kill him instantly with the gun and
only stabbed him because, e.g., he disarmed her or the gun jammed or it slipped out of her hands and slid across the floor and the only handy weapon was a giant knife that just happened to be there, the fact that he suffered would not constitute "cruelty" for legal purposes because she didn't know he WOULD suffer before it happened. She only knew he WAS suffering and was trying to put an end to it.
This is all hypothetical obviously.