MAIN-2727 Fix call to setPostedAsBot() on non-object

I introduced a refactoring error in a7ac26f2. This commit addresses that
error and adds a test to make sure the correct object is passed through
the call stack.

/cc @grunny
Merge pull request #4443 from Wikia/main-2727-non-object

MAIN-2727 Fix call to setPostedAsBot() on non-object