When deleting a build environment that is being used by a build definition, an empty "Error Occured" page with empty stack trace is displayed.
The error, "The Build Environment cant be removed, it is probably used by a build definition."
is displayed in the first page being accessed after the "Error Occured" page.
Fixed in branch r781301.
Fixed in trunk r781322.