Fix a layout pass debug message.
Fix -Wunused-function warning of release build.