I don't think the changes you have made here actually do anything differently unless there are other styles besides stroke and fill that should be passed to pattern. What are you after here?