Duplicate Handling
For whether you flag as a duplicate, consider the purpose of duplicate flagging:
There’s often benefit to having multiple subtle variants of a question around, as people tend to ask and search using completely different words, and the better our coverage, the better odds our fellow programmers can find the answer they’re looking for.
From Linking Duplicate Questions
Does flagging as a duplicate still further this goal? Yes. It connects the questions so that searchers can find the answer that helps them most. So yes, you should.
What it means for a question to have an accepted answer
Stack Overflow doesn't use the term "solved." This is intentional. The idea that a post has been "solved" is contrary to SO's mission: to create a high quality repository of knowledge. The site does not exist to provide people with personalized help. It exists to document standard, robust solutions to specific problems that are encountered in a wide variety of contexts. It is furthermore intended to stimulate readers' ability to work through their own problems rather than feed their dependency on others for help. Using the word "solved" implies that SO's mission was to help that particular user with a problem, rather than document the information. This might be a bit pedantic, but it's important to understand the distinction.
Instead, SO uses the term "accepted." This means that the user posting the question believes that particular answer to be the most appropriate solution to their problem. This gives the answer a level of priority over the others, with the assumption being that the answer is probably in the best position to evaluate whether or not the answer actually works. This assumption is arguably a bit too strong, as the asker sometimes doesn't have the level of knowledge to evaluate which one is best for concerns other than whether the code actually runs (like maintainability or security), but it's what we have.
None of this, however, conflicts with the reasons for why we mark questions as duplicates. So a question having an accepted answer should not factor into duplicate closing.