Revert "Reset @@required_attributes to ensure module state not persisted."

- Use test solution proposed by efleming.

This reverts commit 3549c26fb11a8335f7510c0cec92a301d29c76ba.