Finally put together fix based on Luke's suggestion in bug #762 c#18...took a bit...