Merge pull request #125 from Alexpux/develop

Backport patch for GCC Bug 52015 to GCC 4.6.x and 4.7.x