MDL-38369 repository: Remove output before redirect