Fix bug introduced by gh-1794 merged 7 days ago.

This make the perform method of Elemwise return the wrong dtype in some cases.