Tests for #10945 and #10946

Authored by jstolarek.