Inconsistent behaviour in plugins between development and production

FYI there is an similar topic here Plugin working locally But not in live - #4 by vinothkannans. Anyway good catch and your workaround looks awesome.