Symptoms
When you use memory-optimized table variables outside the natively compiled stored procedures, a LCK_M_SCH_M (schema modify lock) is taken on the corresponding memory-optimized table type during destructing the table variable. In this situation, the concurrent declaration of memory-optimized table variables outside natively compiled stored procedures is blocked.
Resolution
The issue was first fixed in the following cumulative update of SQL Server.
Cumulative Update 3 for SQL Server 2014 /en-us/help/2984923
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.