jacobian for empty matrices: proper treatment
Fixes #791: structural arithmatic for empty matrices

Reverting changes for MX, since that exposes other bugs  -- see #380