Add acceptance test for Redmine #4638.