Add tests for a few issues which can now be closed

Closes #5844, #6541