#599 - bug fix for calling LookupTable on non-square arrays

This is a tiny pull request for the bug that @arunkannawadi found when calling LookupTables on arrays that are 2d but not square.

I also put this case into the unit tests in case any future changes to this class might break that functionality.

This was small enough that I wasn't even sure it needed a PR, but just in case, here it is.