Hotfix/doctrine/common#247 fixes

Includes fixes suggested for #247 (plus a weird fix on a failure with `array_map` on PHP <5.4)