Only set merged_at if it's present