Fix JS error when serializing undefined in serializeForComparison
Change template root variable to view, and dontPatch it