bugfix to prevent id 0 for allocated var (reserved for locals)
fixed color comparison : use only RGB with epsilon