Store autocompletion's parameters in a session variable (closes #4331)