Fix assert for layouts.

Currently we assume that the layout must have been set for a subresource.
While this is true it may be set globally instead of on that specific
subresource directly causing the old assert to throw.
1 file changed