add option to avoid sparse arrays in diff function. this fixes problems with abilities not copying or updating