make sure to check for formula first, fdo#80301

Change-Id: Ie822d1a154b7b25437ce7e5d09eb399460823acf