Make array diff work with sparse arrays