The conditions were never True, because the variable 'item' is not set. 'recursetree' uses the variablename 'node'.

The CSS-class 'activeline' is set in 'agenda/item_row.html'