Whenever I run into a frustrating "bug in the compiler" type problem I find it's useful to take a walk or revisit the problem again the following day.
Many times my mistake becomes obvious right away.
Many times my mistake becomes obvious right away.
I've a rule to help recognize it: If I start spouting frustrated profanity, I have to step away from the screen for at least an hour. It's amazing how obviously simple the solution is on my return.