Further generalize support for tuple elements, and in the meantime, fix a bug that made it into one variant of the function but not the other...