Ensure expand context is cloned.
Minor code clean up.