Fix for #9077 - removing old debugging code