@Alexey Maslov
I had a similar experience with "InPlace".
This may work if your applications are as simple as in SAMPLES:
[ "nome est omen" SAMPLES => Simple]
Just a few $ZU() or other %z* stuff may break you, or file references containing *CACHE*.
Or some $ZF() functions with c-binding, ....

Therefore I designed my "2 worlds" approach using ECP as a data bridge: 
Using ECP across IRIS and Caché

6 & 7 are side effects of object inheritance.
Think of a class Person.
But Employee Extends Person
Similar Students Extends Person too
So you have 3 tables but all are Persons  Some with extension some not.  

@6: Table Employee corresponds to class Person and to class Employee

@7: So class person corresponds to Table PERSON, EMPLOYEE , STUDENT

<CLASS DOES NOT EXIST>%Close...
is typical if try to access resultset or just delete rset  after leaving namespace %SYS.
Just reproduced it.

%SYS>w !,rset.%Next(),?5,rset.%Get("Directory"),!?30,rset.%Get("Size"),?40,rset.%Get("MaxSize")
 1    c:\intersystems\iris\mgr\enslib\
                              163       Unbegrenzt
%SYS>ZN "USER" 
USER>k rset
<CLASS DOES NOT EXIST>%CloseCursor+3^%SQL.ClassQueryResultSet.1 *SYS.Database
USER>

#1 there is no "SELECT LAST_SERIAL()" 

#2 depending what your expectation on LAST is I see 2 possible workarounds
#2A LAST = max:    "SELECT MAX(test_id) FROM test
#2B LAST = latest: "SELECT test_id, MAX(ID) FROM test GROUP BY  2"

#2B is based on the fact that you always have an  auto-incremented ID and it's a shortcut of
"SELECT test_id  FROM test where id = (SELECT max(ID) from junior.test)"
or
"SELECT TOP 1 test_id FROM test WHERE ID < 999999999999999999 ORDER BY ID DESC