Using "inline-icon" in TextFields in a Form Layout

Hello,

I am trying to use a “inline-icon” for text fields in a Form Layout. What I am noticing is that the icon is always being shown on the last component of the form and not the component it is actually set on.

The FormLayout :

    final FormLayout form = new FormLayout();
    form.setMargin(false);
    form.setWidth("100%");
    form.addStyleName("light");

The TextField with the icon:

    final TextField ccNumber = new TextField("Credit Card Number");
    ccNumber.setValue("");
    ccNumber.setWidth("50%");
    ccNumber.addStyleName("inline-icon");
    ccNumber.setIcon(FontAwesome.CREDIT_CARD);
    ccNumber.setRequired(true);
    form.addComponent(ccNumber);

The icon actual shows up on the last component on the form.