Recall that for $P$ a forcing order and $\dot{Q}$ a $P$-name for a forcing order, the termspace forcing $T(P,\dot{Q})$ consists of minimal-rank names for elements of $\dot{Q}$, ordered by $\dot{q}'\leq\dot{q}$ iff $1_{P}\Vdash\dot{q}'\leq_{\dot{Q}}\dot{q}$. In his chapter in the Handbook of Set Theory, James Cummings states the following result:
If $\kappa$ is inaccessible, $P$ is $\kappa$-cc. and $\dot{Q}$ is forced to be $\kappa$-cc., $T(P,\dot{Q})$ is $\kappa$-cc.
and attributes it to the paper "More saturated ideals" by Matthew Foreman. However, I was unable to find the above statement in the paper. Later on, Cummings proves it, but only for measurable (or at least Jonsson) $\kappa$.
Is there a direct proof (or a different source) for the exact result above?
Edit:
Philipp Lücke in the comments gave an argument that the stated result is actually false. If $|P|<\kappa$ and $\kappa$ is weakly compact, it holds. So another interesting question would be:
Does the above statement hold for (not necessarily weakly compact) $\kappa$ if $|P|<\kappa$?