Fixes #5509.