This is a tracking item for the original upstream issue:
angular-ui#6037
The reason I'm opening this is because #41 reverts the PR that closed it, due to other issues created by that PR. Instead of breaking the general case, I've chosen to leave the edge case broken instead, and this issue is here to remember why this branch as made that decision.
Also, I'd love some ideas on how to fix this.