mxcl/homebrew — pull request #18636 by rteabeault (2013-03-21 15:34:59+00:00)
Title: Issue #18634 - Unload the constant before calling Formula.factory

This seems to fix the problem. Instead of unloading the constant after calling Formula.factory do it right before.