Fix ticket #574 on different results between sequential and parallel encoding See merge request !1000