CORE-5294: Work around trailing slash issues.