Added unit tests to recreate original issue, and verify fix.