Compare transparent color to 256 instead of null.
Seems to at least make a difference in the profile output.