error_resilience: move the MECmpContext initialization into ER code