Remove problematic code from os_js_alter.

Follwoing #6251