Fixes incomplete change in #11981 Use the proper variable (`body_def`) during package creation for package subclasses.