Seems to have subpar behavior when exactly one of the terms is an identifier info, but I'm not sure. Should all identifier names come before all non-identifier names, or something? - Daniel