Sorry for my quick and inaccurate response last time. I thought you were checking equality between the cellview and the instance master.
I think the problem is likely that you have selected a pcell. Check to see if the instance has a superMaster: css()->master->superMaster
I tried your statement in a schematic and I got t for a non-pcell and nil for a pcell. The reason is because pcell instances have a subMaster created at evaluation time. The dbOpenCellViewByType command will open the superMaster out of the library. When you instantiate a pcell, the parameters are evaluated and a subMaster of the pcell is created. If you create another instance with the same parameters, they will reference the same master (subMaster). However, if you change the parameter on one instance, a new subMaster will be created, althouth both subMasters will reference the same superMaster.