Switch to own implementation of SparseArray, for the previous workaround for SparseIntArray avoidence was awful. Also fixes the two tests that failed in connection with #124