I think you may be end up using this if you're calling the function on logicals, we probably should optimize the logical case elsewhere.
Please revert this change, I have no problem with other changes in the pull request.