fix jios_write template function detection so that base class lookup works