Properly resolve form when called within an templated control.