A more traditional CPP-based fix for #483 / 01dcdeb
Merge pull request #484 from hvr/pr-base48b

A more traditional CPP-based fix for #483 / 01dcdeb