Improve robustness of tests for module flags metadata

Fix clang tests to not break if the ID numbers of module flags metadata
nodes change.