Fixed more signed/unsigned comparison warnings from older compilers that can't infer the 'best' template instantiation types.