Fixes bug caught by tests; adds new test for span[data-picture]