Minor bugfix to avoid .toplevel() breaking for RelatedManager code