Fixed scalar handling for the jsonb_replace