Add some tests for resolved bugs

Closes #9249.
Closes #13105.
Closes #13837.
Closes #13847.
Closes #15207.
Closes #15261.
Closes #16048. 
Closes #16098.
Closes #16256.
Closes #16562.
Closes #16596.
Closes #16709.
Closes #16747.
Closes #17025.
Closes #17121.
Closes #17450.
Closes #17636.