Bug fix for previous commit

I somehow checked this into the wrong branch. Sorry.
Fix for relex2logic failure.

Another bugfix that got lost in hyperspace.
got pushed into the wrong branch. Whoops.
Merge pull request #855 from linas/dmos

two missing fixes that got pushed into the wrong branch.