I also ran into many such issues in the past. See this and this, for example. I was left with the impression that macro code was handled differently, but never really understood why.