Gittrac #4102:  Initial actual fix is in place; need to make a test for
this; lots of temporary comments where the code needs to be clarified.