Fix comparison of frozen sources.

Fixes #3224