Add allowed_refs to Widget.