The append_if function was returning the list that was modified, but this was unnecessary, since the list is mutated in place. Instead, returning a flag indicating what happened in the function allows for more accurate logging. Change-Id: I25913a18cd7eae2f696291052e503f7e7167edb5