Fix template shadowing issue with gcc