The situation you are describing is very usual. As one's knowledge and understanding of the field grows, it is only natural that you start getting new research ideas. Also, the research approach keeps getting more evolved and sharper, so it is perfectly plausible that you
... recently solved a problem that I had struggled with for a few weeks, back in my first year.
As far as this much part goes, all that you need to say to yourself is - congratulations, you have progressed significantly along the learning curve, from a complete greenhorn researcher to a more polished, groomed researcher.
Is it wise to make an attempt to publish these ideas?
I would advice against it, and would collect my arguments as follows:
If you have got to the thesis stage, invariably there must be a preliminary stamp of approval already for the work from your department or the "student-research-committee". While marginally field-specific, this is generally in the form of an open departmental presentation, where all critique and suggestions are completely welcome. So, even in the present form, the work must be PhD-worthy.
While it is great that you are getting good ideas, implementing those ideas would come at a time-cost. So you have to ask yourself, whether you can actually afford it?
(Again, marginal field dependence here, in many places and fields, there are some stringent deadlines at play, e.g. you get only maximum N months between the preliminary-PhD presentation and the final thesis submission.)
There is no upper limit to perfection. After you have implemented the ideas you are getting on date, by the time you put it all together, there would be still more ideas, and the process can continue further too. Beyond a certain stage, the process will only drag on for longer and longer, it will frustrate you, and cause you to lose interest beyond a stage.
Please remember that there is life after PhD too. When you wrap up your thesis, you can move on to more independent research/other research projects which may or may not be related to your PhD work. The longer you drag your thesis, the longer it will take you to get there.
(My main point) All researchers are invariably familiar with something like a personal "Back-of-the-register-list". (More evolved form - something like a document entitled "Ideas" located somewhere in the research folder in the computer.) This is the holy place where all these subsequent ideas land up in some kind of list! Then, this list is revisited at various times in the future, and ideas are picked up, improved on and implemented. That's the way to go about it!
Please remember that PhD thesis submission requirement is merely a comma, not a full stop for research. Perhaps it is a full stop for guided research, but bracing oneself for the afterlife as an independent researcher, I would advise you to just get with the formal requirement of thesis, and there would be ample amount of excitement looking towards the horizon!
All this comes with one caveat, as I later realized, reading the comment by Yuri Y below the post: In case you have found some error somewhere in you earlier work, which is making up the thesis, revising everything and setting it right IS the right course of action. In that case, priorities reverse - you would want to fix this work before advancing further on, if not for anything more, also for preserving your research credentials!