Bugfix/visibility fixes #6757 and test #6755

It looks like 6755 was already fixed with an earlier fix.