Logging and temporary hack for #2168.