writerfilter: fix out of bound array access in ST_Jc's "both" case

Change-Id: Ia9d5e0b8e0685fdf5a9bbcab6a0797af12073a53