engine: fixed typo in checking max_texture_units