The interaction of error fields and resistive wall modes