For the benefit of anyone else who might get this problem in the futrure (which Jason fixed for me - thanks!) it relates to the positioning of the <ul> and </ul> tags in relation to the 'show if' code.
Moving the tags to the other position (inside or outside) fixed the problem.