Fixing two major bugs:

1) Returns nil when comparing top-level arrays
2) Infinite loop when comparing empty arrays