Add test case for issue #645 (to be fixed in slick-extensions)

Review by @cvogt