Issue #773 fixed (+ non regression tests added)