Fix RLS issues, fix crash on invalid result type for `@splat`, refactor some bits of generic instantiations