State slammed over ‘irrelevant’ evidence