Add check for last commit to only update the local_episodes table if the episode reference exists.