I have recently started composing using some knowledge that I got after a few months of studying counterpoint and harmony (well it is more like trying to compose). And I have mentioned that quite often I unintentionally reinvent in a slightly different manner the existing themes (recently it was "Hava Nagila" and something from Grieg's "Peer Gynt"). The problem is I do not immediately notice, that this is a "reinvention", and that my memory did a trick on me. Who knows, maybe I even have more of that "inspired" themes in my compositions, which I have just failed to notice.
Question: Is this a common thing while composing and how does one deal with it? How do I get sure that this is genuinely my composition and not an implicit memory of an already existing one?
P.S. If it is relevant I do the "composing" in Sibelius (free version) in Common Practice Period style.