Improved check: Complain about returning reference to literals or reference to calculation result (#4317)