Fix a bug where the LastChannelCount always assumed RGB nodes