MBS-5742: clean up chained subtraction/addition, and last_item setting