Updated test for #889 and #823