Don't try to cast a connector to Widget. Fixes #12619

Change-Id: I0fe98ca90ed3969f1af1be60668b4c1c561675eb