So turns out the regression was actually introduced by https://github.com/xwiki/xwiki-platform/commit/5c11a874bd24a581f534d283186e209bbccd8113 (which attempted to put all the code to complete short form statements in a common tool, but looks like there was slight differences between various ways to complete short statements).