Closed #4155: remove debug code