Fixed an incorrect use of `array_unique` that crashes on some versions of PHP.

--HG--
branch : stable