Fix #9501 (expression crash when $geometry is used without a feature)