Remove debugging console.log() from, fixes #18120.
It snuck into the code in 333e91c3a622eb8e123bb1bcf04494df610a22ad.

(cherry picked from commit 83bdf84e593ce9746c2e9ad9d9829fe847b57193)