@before_compile with Module.delete_attribute do not delete @var

Module attributes are expanded during compilation, not runtime, so the @gs_fields in your function call isn’t actually referencing an attribute when you call it, it’s the literal value that was inserted into the AST.