Changes for Inquiry 1769.

I'm a bit hesitant to merge these (though the changes *appear* to work fine with both the current and newer idv.jar).