I have to always return something (like NEW) in the instead of trigger,
but fill NEW with returnings of INSERT into regular table.
Yes, the GID is detemined for the table.
But in test.rc_editing_generic_object( ) you are reurning the NEW that you just inserted from test.rc_editing_specific_object( ).
The gid is filled for the table, but since you are doing an INSERT on the table INSTEAD of the one that came in, the gid is not filled. The view does not read from the table in this case, but writes, so the gid is not yet available in NEW.