Apply patch from doctrine/common GH-221