Fix for "Different notes are not shown if first line is the same"

Apply the fix from Jon48 to 1.4 branch
(https://bugs.launchpad.net/webtrees/+bug/1080013)