Fix a bug in insert, when ref_node has no next value

bug happens when we try to insert an iframe (with media plugins or with source code editor)

iframe used :  <iframe style="height:540px;width:960px" src="http://channel9.msdn.com/Events/Build/2013/3-017/player?w=960&h=540" frameBorder="0" scrolling="no" ></iframe>