[AVCustomEdit] Fix race condition causing random IndexOutOfRangeException.