Fixed calc_output_scale with NO_OUTPUT_SCALE flag set.
Merge pull request #3388 from bartaandras:master