Added a test case for #3. Strangely, this one passes even when #5 fails (i.e., the change that fixes #5 is commented out).