Performance: fewer transformation + correct setup of Z3.
(from redmine: issue id 3740, created on 2019-05-29, closed on 2019-06-04)