Fixing gradient/pattern memory/DOM leak, see #328 (was using the incorrect IDs to attempt to remove)