ecloud:before merging, slices still inverted script to comare against headtail