Add test case for #1149

This shouldn't produce any warnings