Actually your patch proved it can be done in a very clean form. I'd say let's go with your approach, it is more flexible and doesn't require performance testing.
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira