Hi Aderson,
Yes too true. It's partly my fault because I enjoy the challenge of getting things to work. But as you say being too deeply involved without thinking of alternatives is a mistake.
It helps to work with design documentation, perhaps an architectural diagram, in this case, might have helped, to help keep an eye on the big picture.
Breaks also help, perhaps this is where something like the Pomodoro technique comes in, a 5 minute break every 25 minutes might allow other thoughts to surface. One particular issue I've noticed is that in trying to solve an issue, I follow through a lot of code before getting to the nitty gritty, by which time it's easy to lose sight of the problem I was trying to solve in the first place :-)
Also, it reminds me I should go walking more often :-) I often find ideas come to me when I'm doing something else.
Thank you once again for your help and also for your kind offer.
Best Regards,
Steve