Some tweaks to make sure self nodes are handled properly on JSPs.