Use another array diff algorithm if the current on produce a bad result

Fixes #86