TESTS: test for issue #504