Fixes for ticket #3052: some commands started triggering when extra text is supposed to suppress them
Regressions caused by bad refactoring in commit
21feac3bea72b0ecd88a3.
Test cases in tests/CommandInterpreterTest.php were made against the pre-refactoring code, and now check out with the fixed code.
Failures were caused by not changing logic structure when moving from multiple exit points (each if point would return directly with a null or an object) to setting a result variable and then falling through to a common exit point. Without the if statements being restructured, the result variable would just get overridden by the next case.