fixing for models PR astropy/astropy#3024

I slaved away all night to make sure that @embray's oversight is fixed ;-)

@astrofrog feel free to merge when passing.