Fixes #7527 - don't require less in production unless from rake

My attempt at https://github.com/Katello/katello/pull/4673