Merge "Fix two crash causes in Flattener related to hashing" into sc-dev