tests for #5313