BUG: not converting scalars properly to M8/m8 on assignment (GH6079)

partial fix of #6079