Allow removing all parts from a transclusion to remove the transclusion

Rather than make a new function to determine whether it should be apply-able or
not (and run some checks again), move the enable/disable call into a new
function to do these checks and set the result.

Bug: 72191
Change-Id: I133afa1784e1afd44054f93ed84018894f7c6400
Merge "Allow removing all parts from a transclusion to remove the transclusion"