Temporal fix for binary size to avoid buffer overflow. Added test. Fixes #1900