"Inflammable" is derived from the verb inflame, which comes from in- and flame. The OED identifies the prefix as in-2, indicating the second definition of the prefix, rather than the third, which is the negation which is what you believed it to be from. I quote the right definition below:

used in combination with verbs or their derivatives, [...] with the senses ‘into, in, within; on, upon; towards, against’, sometimes expressing onward motion or continuance, [...] . (emphasis mine)

To inflame something is to set it on fire–i.e. to use motion to cause something to be in flames.

"Invaluable" does come from in- expressing negation, and thus it means not able to be valued. However, this can be interpreted two different ways—one, it is so worthless that it has no value, or two, it is so valuable that we can not put a value on it—like the concept of there being no finite number that is larger than the rest—you can always add one. The common meaning is #2, but the OED recognizes both definitions.

Neither of these examples are exceptions—the first is misleading because the two prefixes look identical, the second can be understood in two separate ways. The best way to figure these out—have a good dictionary at hand.