Revert "Improve error reporting for wrong component type"

This reverts commit 6aadf3863ccc63c77a57adc949d456a1df1882f4.