Add test for #13259. Closes #13259 and #14742