add test for #287 for 2.2
Backport #287 fix for 2.2.3