[Fixed] task in lua to be correctly inheritable.

Change-Id: Ieb8961a9c33fde0af4f8264c9c8917605b0d833d