Test case for issue 5481