in handler.c under can_see function, find:
if( IS_AFFECTED( victim, AFF_INVISIBLE ) || IS_AFFECTED( victim, AFF_HIDE ) || xIS_SET( victim->act, PLR_WIZINVIS ) )
just above this, add:
// Changed so that immortals are not affected by hidden things. - Aurin
if( IS_IMMORTAL( ch ) )
You may also want to add visible flags for immortals attached to mobs that are hiding or invis, so that you know what's going on with the mob without having to mstat it every time.