Fixes ticket #10638 (and should also fix ticket #10482) by restoring the behaviour from before 3c7dd5ed37da6d2de06c4850de5a319ca9cdd47f. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>