Fix some callsites of ReleaseSysCache().

We accidently call ReleaseSysCache() *before* using the HeaupTuple,
which could lead to undefined behvior or crashes.