Fixes #2881.