Solution sketch for issue #1642.