Integration tests for #9242 and #9640