The following will refine the type of container to Model but that does not actually work at runtime because typeof will yield "Instance" for a Model, not "Model":
assert(typeof(container) == "Model")
The correct code would be asserting IsA("Model") instead.
I'm guessing this may be intended behavior because it seems like it might be hard to implement it otherwise but it would be nice if it worked correctly.