Improve extented debug to analyse BZ #906012.
undo a unless change.
Fix BZ 916387: the warning message should be more understandable.