A recent European court ruling highlights how musical homage can mean walking a legal tightrope. Michael Quinn investigates