Self answers are welcome here. There is no problem in answering your own questions at the time of posting the question. People tend to post self answers in order to share their knowledge they have found through research. They feel enthusiastic and post a self answer. In this process, we see many duplicate questions. Is this a problem? Yes, it is a problem.
Posting self answer to duplicate questions is not different from posting duplicate questions or posting answers to duplicate questions. The problem is same at the core. Because the system shows the same suggestions even if we are just posting questions or answers along with it. In both the cases, there is a similar pattern in users - Not searching on the site before posting the question. So, the question should be How to discourage users to post answers to duplicate questions?.
When someone starts writing title or body of questions, the system will show related questions which are already asked on the same topic. By experience, I can say this search is accurate than the system search for finding duplicates. If we go through all the suggestions we are shown, it is easy to find the original and then answer the existing question.
Before posting a question (or answering your question like Q&A question), you are recommended to search if the question is already asked. The suggestion shows you many related questions. Also some related questions in the right hand side bar while writing body for some time. Besides this, you may go for search bar and type based on operators. This will definitely prevent duplicate questions.
The answer is already posted along with question. What can we do?
If the questions are exactly duplicates and also the wording is nearly identical, moderators may perform a merge. We should first vote to close as duplicate and then request for a merge through flagging. But we can't guarantee a merge in all the cases where there are exact duplicates. This is only done in a few cases. In these cases, there are a few points to consider.
There are many exact duplicates but these are not merged because they do not meet the above criteria. The intent of the question will be same but the terms and words used in the question will be different. This is the case which you have linked in the question. In the above case, the wording of new duplicate is a bit different than the target question but the intent is same. In these cases,
leave a comment explaining why asking and answering questions is not useful. Then vote to close it as a duplicate.
we can ask the user who posted in Q&A to search before question is posted.
If the answers are not repetitive, we can request the user to delete the answer and post it near the original before it is too late i.e., Q&A are highly upvoted.
As I said in the comment under this question I am answering, (now deleted due to unknown reasons), there are some people who do not take consider close voting or moderation seriously and only concentrate on contributing through answering. Some do not agree with the duplicate closures and answer duplicate questions in spite of duplicate comments under the question or off-topic votes on the questions. It is a bit difficult to make them understand answering duplicates is discouraged. We can only do two things. 1. Say once or twice and leave it to them. 2. Try, try and try. They will understand some day. (This path is difficult because you may receive some not good comments).
If the posted question is off-topic, close it and downvote both question and answer. Answering off-topic questions is also discouraged. Question closure has nothing to do with presence of answers. We can close a question even if there are answers under it. It stops more answers posted to it. After a few days, we will see a delete option. Then we can delete both question and answer.
In short, it is a matter of self moderation and voting. Let the users (who is posting such questions) know what is the problem and use your votes wisely. Act fast, close and delete off-topic question