[WFLY-1291] Invalid package capabilities for registered modules

https://issues.jboss.org/browse/WFLY-1291
#### Contains #4500