Respect 'key' prop for root component

Fixes #590.

cc @ide