The ref_states and ref_state_patterns fields are being set only when
they exist in the index.
In the case where the fields are requested, but are not in the index,
this results null values exceptions when attempting to populate the
change data.
Set the fields when they are requested. If the field does not exist
in the index, set it to an empty list.
Bug: Issue 5783
Change-Id: I35326bfe175cdd94b43c30f2875e83417be253ba