Fixed issue #4259. Improved assert messages in all tests. Minor code cleanup (still much to do).
Merge pull request #4261 from Donnerbart/maintenance-3.x

Fixed issue #4259
Merge remote-tracking branch 'hz/maintenance-3.x' into maintenance-3.x-seeburger