fix 21909

previously we passed a temporary object and saved a reference to it in
unit_callable contructor. Leading to sefaults and undefined bahaviour.