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>
(cherry picked from commit 02064ba3a37754183cf7e7a4c1ffd3cdf971b5dc)