Added check against the use of the same ref multiple times

Using the same `ref` multiple times can cause some pretty weird things to happen (usually resulting in the last component using the `ref` to be set for an owner's refs) as discussed here: https://github.com/facebook/react/issues/1782