Merge pull request #2591 from dopplershift/fix-infinite-recursion

Fix infinite recursion in units with ndarray subclasses.