Implement what is suggested here: https://sft.its.cern.ch/jira/browse/ROOT-6711