Adding a test for this inner loop madness