Uh, that's the point!
That 2018 ~$4M cap would INCREASE with extensions.
Not for ALL extensions. It depends on the composition of the current cap hit (how much is something other than salary), and how the new guaranteed money of the extension is structured (how much is amortized signing bonus).
Shaq Mason's extension increased his 2018 cap hit because his "convertible" salary amount was significantly less than the 2018 portion of total signing bonus. His 2018 cap hit increased from just over $2M to just over $3.4M.
Mason's 2018 cap hit
was composed of:
$1.907M salary
$111k payment on previous signing bonus
TOTAL = $2.018 cap hit
$1M of 2018 salary converted to signing bonus leaves $1.018
$11M in new signing bonus added to that $1M = $12M
Divided by 5 years, including 2018 = $2.4M/year
$2.4M added to remaining 2018 cap hit = $3.418M new cap hit.
Net decrease in cap space of ~$1.4M
An extension for Trey Flowers right now ($1.907 salary + $139k previous signing bonus payment) would almost certainly decrease cap space by much more than $1.4M since his new signing bonus money would likely be significantly more than $11M.
Counter example:
Gostkowski's current cap hit is $5M. It's composed of:
$3.2M salary ($2.2M convertible to bonus)
$1.5M pro-rated portion of previous signing bonus
$200k weekly bonus
$100k workout bonus
For a 2-yr extension ...
--- Subtract $2.2M to convert to signing bonus = $2.8M.
--- Add (say) $3.8M in new signing bonus to the converted $$ = $6M
--- Divide by 3 years (the entire term of the extended contract) = $2M/year
--- Add the $2M to the $2.8M remaining for 2018 after conversion = $4.8M
Savings is $200k on the 2018 cap.