I raised a custom moderator flag, and it was marked as helpful and the answer got deleted. I would recommend doing that in the future.
The flag read:
This self answer is noise. It provides - the same solution as the other answer, the original code provided in the question (which is a useless detail), and a disclaimer that it was copied from the other answer
The NAA (Not an Answer) flag is not intended for purposes like this, because it is still an answer, although copied from another answer.