This is an addendum to #5287 and includes some improvements. Signed-off-by: Dennis Gaida <2392217+DennisGaida@users.noreply.github.com>