Path are cast to string to avoid bug with in_array().