skip over unsafe casts when making constant expressions, but add them back afterwards