Issue 1471

See #1471 for details on this PR.

Fixes #1471.