Refactor #4126: Make override properties automatically in extend function