Fixed 'Bug 22977 - Unable to remove custom code template'.