fixes #1494, borrows test case from evs-chris:gh-1494

alternative fix for #1494