NXP-14175: protect against empty currentDocument