Add missing tests in test_loggamma(), see issue 2317