Fix #16511: changes in interface dependencies should trigger recompilation
If the union of dependencies of imported modules change, the
field of the interface files should change as well. Because of that, we
need to check for changes in this in recompilation checker which we are
not doing right now. This adds a checks for that.