Add a reduced test case for PR 5286