Backport bash security fix from trunk.