Fixed the assertion so that paralell build is happy. Added some cases.
Fixed the unit test (forgot to include that earlier).
Merge branch 'release'