Fix menu generation after changes in deftrait