Add unit tests which verify that the issues from bug 48962 and 50755 do not occur any more on the latest version