bugfix for array_flip() error detailed in ticket 150