Fix expand_model
The base models don't have an expand attribute when they are fully expanded, so we need to safeguard against that or we'll try to intersect an array with nil.
The base models don't have an expand attribute when they are fully expanded, so we need to safeguard against that or we'll try to intersect an array with nil.