I accepted a request to referee a mathematics paper (available as an arXiv preprint long before it was submitted), but haven't started to write a report yet. Before receiving the referee request I'd already worked on the preprint a little bit and been able to improve the main result somewhat which I thought wasn't good enough to be published anywhere or to tell anyone. When I accepted the referee request I had no intention of continuing to work on it and since then have spent time on other projects.
The issue is, after solving a problem unrelated to the paper in question, I suddenly realised that the method I used to solve the unrelated problem could be adapted to significantly advance the main result of the paper I'm reviewing, and would lead to publishable work.
Should I wait for the paper I'm reviewing to be published (I plan to recommend to accept it anyway) before making my improvements available?