Fix 1821, third try

As asked per #1849.