Moved prep_texture_expr inline

plus fixed bug at line 373

Signed-off-by: Marius Avram <marius.avram1309@gmail.com>