Fixes #5207 returning false if filename is not set