Expose the Flax code quality problems
# What does this PR do?

This PR is just there to expose the problems related to the code quality with objects introduced in the flax PR. #7914 contains a fix to a few of them, maybe all.