Check for errors from AST_VECTOR_REPLACE and clean memory if needed. Change-Id: I124d15cc1d645f85a72a1279f623c1993b304b0b