Fetch the nearest Controller instead of relying on global state.

Controller:curr() in this context are equivalent to calling
getToplevelController() which already solves the issue of nested
GridFields.
Merge pull request #3203 from mateusz/remove-global-state

Fetch the nearest Controller instead of relying on global state.