Merge "Move illegal state detection in stub classes to warning"