I was about to go and look at this, but I had a problem when attempting to compile with MSVC.
Thanks! Here is a v4 which includes your fix.
I'm also just looking at you ERROR() macro, it seems that core code is quite careful not to use __VA_ARGS__ on compilers where HAVE__VA_ARGS is not defined. I'd say this needs to be fixed too. Have a look at the trick used in elog.h for when HAVE__VA_ARGS is not defined.