Fixed a bug with AABB2D.toIndexedSeq
Added a test for the issue as well