Erase Picture + Yanfly Engine error?

There seems to be a bug with Yanfly's Core engine that I can't figure out. This happened when I tried to do a flashlight effect. Here are the steps:

1. Display a picture.

2. Move that picture, and set the origin to 'Center'.

3. Erase picture. And this error pops up:

Script 'Sprite_Picture' line 54: NoMethodError occurred.

Undefined method 'width' for nil:NilClass.

Strangely, this error does not pop up if you set the origin to 'Upper Left'. I think it may be a Yanfly problem because this error does not replicate on a clean project.

This thread here seems to fix the problem if it's just a "Show Picture" with center, but the Move picture problem still appears to be there.

http://forums.rpgmakerweb.com/index.php?/topic/32653-problem-with-erase-picture-command/?hl=%2Berase+%2Bpicture+%2Berror#entry319500

I am using Yanfly Core 1.09. Anyone else encounter this issue? How can I solve it?
link to script?

Original thread: https://forums.rpgmakerweb.com/threads/erase-picture-yanfly-engine-error.42938/