fix issue with possible slicing problem on make_expected_from_error

Use E instead of E const&.