The addition checks to see if the $action was set, THEN we can get the controller name if $controller was not set - otherwise leave $controller as null.
I tested this change in my application and the problem was solved.

This also keeps the functionality consistent as you can now do $this->_redirector->goto(null); and be redirected to the current module index rather than the controller you are currently in.