ActionController: set layout module name early

Didn't work correctly before