Added workaround for PHP bug 47206, closes #955