Fix inheritance of stored_attributes (fixes #14672)

[Brad Bennett, Jessica Yao, & Lakshmi Parthasarathy]