fix assertions reported by Christoph

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Merge branch 'opt' of https://git01.codeplex.com/z3 into opt