Fixed issue with resolving states of subcomponents. It did not look in
the error model of the subcomponent. Furthermore it did not report an
error if the name of the state was not found.