More backporting of debug subpackage support.