Core: add test to illustrate the issue (#683).

See #683.